using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Raster._MosaicDataset
{
    /// <summary>
    /// <para>Calculate Cell Size Ranges</para>
    /// <para>Computes the visibility levels of raster datasets in a mosaic dataset based on the spatial resolution.</para>
    /// <para>根据空间分辨率计算镶嵌数据集中栅格数据集的可见性级别。</para>
    /// </summary>    
    [DisplayName("Calculate Cell Size Ranges")]
    public class CalculateCellSizeRanges : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CalculateCellSizeRanges()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_mosaic_dataset">
        /// <para>Mosaic Dataset</para>
        /// <para>The mosaic dataset to calculate the visibility levels for.</para>
        /// <para>要计算其可见性级别的镶嵌数据集。</para>
        /// </param>
        public CalculateCellSizeRanges(object _in_mosaic_dataset)
        {
            this._in_mosaic_dataset = _in_mosaic_dataset;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Calculate Cell Size Ranges";

        public override string CallName => "management.CalculateCellSizeRanges";

        public override List<string> AcceptEnvironments => ["parallelProcessingFactor"];

        public override object[] ParameterInfo => [_in_mosaic_dataset, _where_clause, _do_compute_min.GetGPValue(), _do_compute_max.GetGPValue(), _max_range_factor, _cell_size_tolerance_factor, _update_missing_only.GetGPValue(), _out_mosaic_dataset];

        /// <summary>
        /// <para>Mosaic Dataset</para>
        /// <para>The mosaic dataset to calculate the visibility levels for.</para>
        /// <para>要计算其可见性级别的镶嵌数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Mosaic Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_mosaic_dataset { get; set; }


        /// <summary>
        /// <para>Query Definition</para>
        /// <para>An SQL expression to select specific rasters in the mosaic dataset on which to calculate visibility levels. If no query is specified, all the mosaic dataset items will have their cell size ranges calculated.</para>
        /// <para>一个 SQL 表达式，用于在镶嵌数据集中选择用于计算可见性级别的特定栅格。如果未指定查询，则将计算所有镶嵌数据集项的像元大小范围。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Query Definition")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _where_clause { get; set; } = null;


        /// <summary>
        /// <para>Compute Minimum Cell Sizes</para>
        /// <para><xdoc>
        ///   <para>Compute the minimum pixel size for each selected raster dataset in the mosaic dataset.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Compute the minimum pixel size. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Do not compute the minimum pixel size.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>计算镶嵌数据集中每个选定栅格数据集的最小像素大小。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 计算最小像素大小。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不计算最小像素大小。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Compute Minimum Cell Sizes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _do_compute_min_value _do_compute_min { get; set; } = _do_compute_min_value._true;

        public enum _do_compute_min_value
        {
            /// <summary>
            /// <para>MIN_CELL_SIZES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MIN_CELL_SIZES")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_MIN_CELL_SIZES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_MIN_CELL_SIZES")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Compute Maximum Cell Sizes</para>
        /// <para><xdoc>
        ///   <para>Compute the maximum pixel size for each selected raster in the mosaic dataset.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Compute the maximum pixel size. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Do not compute the maximum pixel size.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>计算镶嵌数据集中每个选定栅格的最大像素大小。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 计算最大像素大小。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不计算最大像素大小。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Compute Maximum Cell Sizes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _do_compute_max_value _do_compute_max { get; set; } = _do_compute_max_value._true;

        public enum _do_compute_max_value
        {
            /// <summary>
            /// <para>MAX_CELL_SIZES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MAX_CELL_SIZES")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_MAX_CELL_SIZES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_MAX_CELL_SIZES")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Maximum Cell Size Range Factor</para>
        /// <para><xdoc>
        ///   <para>Set a multiplication factor to apply to the native resolution. The default is 10, meaning that an image with a resolution of 30 meters will be visible at a scale appropriate for 300 meters. The relationship between cell size and scale is as follows:</para>
        ///   <para>Cell Size = Scale * 0.0254 / 96</para>
        ///   <para>Scale = Cell Size * 96 / 0.0254</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>设置要应用于本机分辨率的乘法因子。默认值为 10，这意味着分辨率为 30 米的图像将以适合 300 米的比例可见。像元大小和比例之间的关系如下：</para>
        ///   <para>像元大小 = 比例 * 0.0254 / 96</para>
        ///   <para>比例 = 像元大小 * 96 / 0.0254</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Cell Size Range Factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _max_range_factor { get; set; } = 10;


        /// <summary>
        /// <para>Cell Size Tolerance Factor</para>
        /// <para>Use this to group images with similar resolutions as having the same nominal resolution. For example 1 m imagery and 0.9 m imagery can be grouped together by setting this factor to 0.1, because they are within 10% of each other.</para>
        /// <para>使用它可以对具有相同标称分辨率的分辨率相似的图像进行分组。例如，1 m 影像和 0.9 m 影像可以通过将此系数设置为 0.1 来组合在一起，因为它们彼此之间的距离在 10% 以内。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cell Size Tolerance Factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _cell_size_tolerance_factor { get; set; } = 0.8;


        /// <summary>
        /// <para>Update Missing Values Only</para>
        /// <para><xdoc>
        ///   <para>Calculate only the missing cell size range values.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Calculate cell size minimum and maximum values for selected rasters within the mosaic dataset. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Calculate cell size minimum and maximum values only if they do not exist.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>仅计算缺失的单元格大小范围值。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 计算镶嵌数据集中所选栅格的像元大小最小值和最大值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 仅当像元大小值不存在时，才计算像元大小最小值和最大值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update Missing Values Only")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _update_missing_only_value _update_missing_only { get; set; } = _update_missing_only_value._false;

        public enum _update_missing_only_value
        {
            /// <summary>
            /// <para>UPDATE_MISSING_ONLY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("UPDATE_MISSING_ONLY")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>UPDATE_ALL</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("UPDATE_ALL")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Updated Input Mosaic Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Mosaic Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_mosaic_dataset { get; set; }


        public CalculateCellSizeRanges SetEnv(object parallelProcessingFactor = null)
        {
            base.SetEnv(parallelProcessingFactor: parallelProcessingFactor);
            return this;
        }

    }

}